﻿@page "/Home/Mall/List"
@inherits YiMeiJiaService.Assembly.BaseComponent
@using YiMeiJiaLibModel.Config
@using YiMeiJiaApp.Pages.Components
@using YiMeiJiaLibModel.Business


<Headers MyPartialText="@classNames"></Headers>

<header style="margin-top:45px;">
    <!--标题-->
    <div class="title-box">

        <a class="title-center" href="javascript:;">
            <input type="text" class="cm-input-noborder" @bind="searchStr" placeholder="搜索" />
        </a>
        <a id="menubtn" href="javascript:;" class="title-right" @onclick="(()=>Search())">
            <img src="@ApiConf.ApiStatic()/Images/search.png" class="header-img" />
        </a>
    </div>
</header>
<header style="margin-top:90px;" class="header-sort">
    <!--标题-->
    <div class="title-box">
        <a id="" href="javascript:;" class="title-right cm-w-25 " @onclick="(()=>ExpandSort(1))">
            综合
        </a>
        <a id="" href="javascript:;" class="title-right cm-w-25" @onclick="(()=>ExpandSort(2))">
            价格
        </a>
        <a id="" href="javascript:;" class="title-right cm-w-25" @onclick="(()=>ExpandSort(3))">
            销量
        </a>
        <a id="" href="javascript:;" class="title-right cm-w-25" @onclick="(()=>ExpandSort(4))">
            其他
        </a>
       
    </div>
    @* 综合排序 *@
    <div class="dv-sort" id="comp-sort">
        <div class="dv-sort-line">
            顺序
        </div>
        <div class="dv-sort-line">
            倒序
        </div>
    </div>
</header>

<div class="cm-app-container cm-txt-center">
    <div class="dv-shop-container">
        @if (_goodsCategory != null && _goodsCategory.list.Any())
        {
            foreach (var item in _goodsCategory.list)
            {
                <div class="shop-item cm-txt-center" @onclick="@(()=> GoDetail(item.id))">
                    <div class="shop-item-img">
                        <img src="@item.image" />
                    </div>
                    <div class="shop-item-desc">
                        <p class="desc-tit">@item.name</p>
                        <p class="desc-price">原价<s>@item.mktprice</s>   </p>
                        <p class="desc-other">现价 : <span>@item.price</span></p>
                    </div>
                </div>
            }
        }
    </div>
</div>


<script>
    var returnUri = function () {
        window.history.back();
    }
</script>
